package com.example.wb.myfirstandroid;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;

public class StartActivity extends BaseActivity implements View.OnClickListener  {


    @Override
    protected int getLayoutId() {
        return R.layout.activity_start;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Button btnLogin=(Button) findViewById(R.id.btn_login);
        Button btnCalculator=(Button) findViewById(R.id.btn_calculator);
        Button btnTestListView=(Button) findViewById(R.id.btn_listViewTest);
        btnLogin.setOnClickListener(this);
        btnCalculator.setOnClickListener(this);
        btnTestListView.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId())
        {
            case R.id.btn_login:
                startActivity(new Intent(StartActivity.this, Main2Activity.class));
                break;
            case R.id.btn_calculator:
                startActivity(new Intent(StartActivity.this, CalculatorAction.class));
                break;
            case R.id.btn_listViewTest:
                startActivity(new Intent(StartActivity.this, ListViewTestActivity.class));
                break;
        }
    }
}
